grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
grails.mime.use.accept.header = false
grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
                      xml: ['text/xml', 'application/xml'],
                      text: 'text/plain',
                      js: 'text/javascript',
                      rss: 'application/rss+xml',
                      atom: 'application/atom+xml',
                      css: 'text/css',
                      csv: 'text/csv',
                      all: '*/*',
                      json: ['application/json','text/json'],
                      form: 'application/x-www-form-urlencoded',
                      multipartForm: 'multipart/form-data'
                    ]
// The default codec used to encode data with ${}
grails.views.default.codec="none" // none, html, base64
grails.views.gsp.encoding="UTF-8"
grails.converters.encoding="UTF-8"

// enabled native2ascii conversion of i18n properties files
grails.enable.native2ascii = true

// set per-environment serverURL stem for creating absolute links
environments {
    production {
        grails.serverURL = "http://www.drawYourDestiny.com"
    }
}


log4j = {
   appenders {
       appender new org.apache.log4j.DailyRollingFileAppender(name:"stacktrace", fileName:"${System.properties['user.dir']}/logs/stacktrace.log",
               datePattern: '\'_\'yyyy-MM-dd', layout:pattern(conversionPattern: '%d{ISO8601}\t%p\t%c:%L\t%m%n'))
       
       console name:'stdout', layout:pattern(conversionPattern: '%d{ISO8601}\t%p\t%c:%L\t%m%n')
   }

   error  	'org.codehaus.groovy.grails.web.servlet',  //  controllers
	       	'org.codehaus.groovy.grails.web.pages', //  GSP
	       	'org.codehaus.groovy.grails.web.sitemesh', //  layouts
	       	'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
	       	'org.codehaus.groovy.grails.web.mapping', // URL mapping
	       	'org.codehaus.groovy.grails.commons', // core / classloading
	       	'org.codehaus.groovy.grails.plugins', // plugins
	       	'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
	       	'org.springframework',
	       	'org.hibernate'

	warn  	'org.mortbay.log'
    
   	debug 	'stacktrace':'grails.app'
	   			
    additivity = true 
}


grails {
   mail {
     host = "smtp.gmail.com"
     port = 465
     username = "drawYourDestinyAccount@gmail.com"
     password = "passwordcomics"
     props = ["mail.smtp.auth":"true", 					   
              "mail.smtp.socketFactory.port":"465",
              "mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
              "mail.smtp.socketFactory.fallback":"false"]
   }
}



comics{
	availChars=[]
	//	CONSTRAITS
	maxSizeComic=10000000		// 10M
	maxSizeAvatar=100000		// 100k
	defaultPathImageAvatarM	='maleGender.png'
	defaultPathImageAvatarF	='femaleGender.png'
	defaultPathImageAvatarN	='noneGender.png'
	defaultPathImageComic	='noneComic.png'
	
	// ENUMS
	allowedTypeFiles=['PNG','GIF', 'JPG', 'JPEG']
	gender=['N','M','F']	//none, male, female
	
	//	PATHS
	path=System.properties["user.dir"]+'/web-app/uploads'
	fileFolders=['/comic','/user']

	//	PERMISSIONS
	shouldAutenticateActions=['create','save','delete','update','edit']	// mirar que mas metodos tienes que estar logeado
	actionAllowedUser=['create','save']
	actionAllowedAutenticate=['index','show','login']
	actionAllowedInitial=['index','list']
}
     